﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NetFrameworkExtensions.Collections
{
  public class InverseComparer<T> : IComparer<T>
  {
    private IComparer<T> comparer;

    public InverseComparer(IComparer<T> comparer)
    {
      this.comparer = comparer;
    }

    public int Compare(T x, T y)
    {
      return comparer.Compare(y, x);
    }
  }
}
